package com.dudy.common.base;

import tk.mybatis.mapper.entity.Example;

import java.util.List;

/**
 * @program: auth_demo
 * @author: dudy
 * @create: 2020-12-24 09:47
 * @description:
 **/
public interface BaseService<T, V> {
    int deleteByPrimaryKey(Object id) throws Exception;

    int deleteByExample(Object example) throws Exception;

    int insert(T record) throws Exception;

    int insertSelective(T record) throws Exception;

    V selectByPrimaryKey(Object id) throws Exception;

    List<V> selectByExample(Object example) throws Exception;

    int countByExample(Object example) throws Exception;

    List<V> selectAll() throws Exception;

    V selectOne(T record) throws Exception;

    V selectOneByExample(Object example) throws Exception;

    int updateByPrimaryKey(T record) throws Exception;

    int updateByExampleSelective(T record, Object example) throws Exception;

    PageData<V> selectPageByExample(V v, Object example) throws Exception;

    V create();

}
